<%-- 
    Document   : DangNhap
    Created on : Mar 10, 2011, 2:48:35 PM
    Author     : User
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" type="text/css" href="css/style.css">
    </head>
    <body>
       <div id="container">
	<div id="header" title="sitename">
                 <%@ include file=  "Include/header.jsp" %>

	</div><!--header-->
	<div id="mainnav">
		 <%@ include file=  "Include/mainnav.jsp" %>
	</div><!--mainnav-->
	<div id="menu">
	  <h3>Danh mục sách</h3>
                 <%@ include file=  "Include/menu.jsp" %>
        </div><!--menu-->
	<div id="contents">
		<div class="blogentry">
                  <% if(session.getAttribute("TenDangNhap")!=null){
                                                String user = session.getAttribute("TenDangNhap").toString();
                                                out.print(user);

                                           }%>

                    <form name="formdangnhap" method="post" action="/0842188_Tuan1/DangNhapController" >

                                  <table border="0">


                                  <tr>
                                      <td colspan="2" align="center"> <b>Thông Tin Đăng Nhập</b> <br>

                                      </td>
                                  </tr>
                                  <tr>
                                      <td align="left"style="padding-left: 130px;">Tên đăng nhập:</td>
                                      <td align="left">

                                          <input class="textdangky" style="width: 110px;" name="txttendangnhap" id="txttendangnhap"  type="text" /> </td>
                                  </tr>
                                  <tr>
                                      <td align="left"style="padding-left: 130px;">Mật khẩu:</td>
                                      <td align="left"><input class="textdangky" style="width: 110px;" name="txtmatkhau" id="txtmatkhau"  type="password" />  </td>
                                  </tr>
                                  <tr>
                                      <td colspan="2" style="padding-left: 170px;"><input class="nut" name="btndangnhap" value="Đăng Nhập" type="button" onClick="checkdangnhap()"/></td>
                                  </tr>
                                  <script>
                                      function checkdangnhap(){
                                          if(document.getElementById("txttendangnhap").value != "" &&
                                              document.getElementById("txtmatkhau").value != ""
                                      )
                                              return document.formdangnhap.submit();
                                          alert("Tên đang nhâp và mật khẩu không hợp lệ.");
                                      }
                                  </script>


                              </table>
                                    <%

                                            String message = (String) request.getAttribute("Message");
                                            if (message != null) {
                                                out.println("<p align='center'><font color='red'>"+message+"</font></p>");
                                            }
                                        %>
                          </form>
		</div>
	</div>
	<div id="footer">
		<%@ include file=  "Include/footer.jsp" %>
	</div>
       </div><!--container-->
    </body>
</html>
